package proto;

import java.awt.Color;

/**
 * Class for the EmptyTile
 * @author Bitjaeger
 */
public class EmptyTile extends Tile {
    public EmptyTile(){
        neighbors = new Tile[4];
    }

    @Override
    public Field GetField(Point point) {
        return null;
    }

    @Override
    public boolean MayIGoInDirection(Direction direction){
        return false;
    }

    @Override
    public Color[][] GetMatrix() {
        Color[][] matrix = new Color[this.GetColumnCount()][this.GetRowCount()];
        for (int y = 0; y < fields[0].length; y++) {
            for (int x = 0; x < fields.length; x++) {
                matrix[x][y] = Color.BLACK;
            }
        }
        return matrix;
    }

    @Override
    public boolean[] GetEdge(Direction direction) {
        boolean[] edge = null;
        switch (direction) {
            case LEFT:
            case RIGHT:
                edge = new boolean[GetRowCount()]; // Default = false
                break;
            case UP:
            case DOWN:
                edge = new boolean[GetColumnCount()];
                break;
        }
        return edge;
    }
}
